Embodiments of the invention relate to methods and systems for ordering software instructions using future values. In particular, embodiments of the invention relate to methods and system for ordering a first instruction that consumes a value of an object such that it is processed before a second instruction that defines the value of the object.
Traditionally, data dependencies form the basis of instruction ordering. In other words, in order for instruction ordering to be semantically correct, the production or definition of a value of an object must precede any consumption of the value of the object.
Following traditional instruction ordering, processors assign producer instructions (i.e., instructions that produce a value) a production tag (e.g., a name or an identifier). Typically, a production tag includes a physical location of the processor, such as a register, that will store the generated or produced value. Processors then provide consumer instructions (i.e., instructions that consume a value produced with a producer instruction) with tags assigned to producer instructions that provide the values consumed with the consumer instructions. Processors then hold the consumer instructions in specific buffers of a processor, often called reservation stations. When the processor finishes processing a producer instruction, the processor signals the availability of the value produced with the producer instruction. The processor then releases any consumer instructions holding a tag matching the tag of the completed producer instruction.